class Article < ActiveRecord::Base
  TYPE = [
    ["我要订货",1],
    ["我有意见",2]
  ]

  def self.index_news(count,type)
    articles = Article.find(:all,:conditions=>["article_type = ?",type],
      :order=>'top',
      :limit=>count)
    articles
  end

  def self.help_center
    Article.find(:first,:conditions=>["article_type = ?",3])
  end

  def self.about
    Article.find(:first,:conditions=>["article_type = ?",4])
  end

end
